
<?
    require_once('../config.inc.php');
    require_once($config['app_dir'] . '/includes/mailer.class.php');
    require_once($config['app_dir'].'/classes/class.mailshots.php');

    echo "<br>------------------------- on trial end ------------------------------------------------<br>";


    $mailshot = new objMailshot();

	////// mailer mode - default = EmailTrial
	//$mailshot->mailMode = "EmailServiceCost";
   //$mailshot->TrialDays = 1;
   //$userSubscription->supportAddr = "alexander.ganchuk@gmail.com";
   $mailshot->getEmailsArr(); // get selected users email (trial finished, activated & not yet subscribed)
   $mailshot->setMailContent(); // forms an email text
   $mailshot->notifyTrialEnd(); // sends an email
   //@unlink($mailshot->gImagePath);

   $mailshot->writeLog("trial_remind"); //write to lof file named as passed param
  
/*
   echo "<br>------------------------------------ on 3 days left -------------------------------------------<br>";
   $mailshot3 = new objMailshot();

	////// mailer mode - default = EmailTrial
	$mailshot3->mailMode = "EmailTrial3days";
   $mailshot3->TrialDays = 11;
   //$userSubscription->supportAddr = "alexander.ganchuk@gmail.com";
   $mailshot3->getEmailsArr(); // get selected users email (trial finished, activated & not yet subscribed)
   $mailshot3->setMailContent(); // forms an email text
   $mailshot3->notifyTrialEnd(); // sends an email

   $mailshot3->writeLog("trial_remind_3days"); //write to lof file named as passed param
 */

echo "<br>------------------------------ on subscr 5 days left -------------------------------------------------<br>";
    $mailshot5 = new objMailshot();
    $mailshot5->getSubscribedEmail(5);
    $mailshot5->notifySubscrEnd(5);

	$mailshot5->writeLog("subscr_5days"); //write to lof file named as passed param

/*
echo "<br>------------------------------ on subscr 1 days left -------------------------------------------------<br>";
    $mailshot1 = new objMailshot();
    $mailshot1->getSubscribedEmail(1);
    $mailshot1->notifySubscrEnd(1);

    $mailshot1->writeLog("subscr_1days"); //write to lof file named as passed param
 */
	
echo "<br>------------------------------ subscr deactivate -------------------------------------------------<br>";
    $mailshot0 = new objMailshot();
    $mailshot0->getSubscribedEmail(0);
    $mailshot0->notifySubscrEnd(0);

    $mailshot0->writeLog("subscr_deactivate"); //write to lof file named as passed param

?>